package request

type VideoList struct {
	Page
	Type   string `form:"type" json:"type"`
	UserID int    `form:"userId" json:"userId"`
}

type VideoLike struct {
	VideoId int `form:"videoId" json:"videoId"`
	UserId  int `form:"userId" json:"userId"`
}

type VideoComment struct {
	VideoId int    `form:"videoId" json:"videoId"`
	UserId  int    `form:"userId" json:"userId"`
	Content string `form:"content" json:"content"`
}

type VideoCommentList struct {
	VideoId int `form:"videoId" json:"videoId" binding:"required"`
	UserId  int `form:"userId" json:"userId"`
	Page
}

type VideoDetail struct {
	VideoId int `form:"videoId" json:"videoId" binding:"required"`
}

func (videoDetail VideoDetail) GetMessages() ValidatorMessages {
	return ValidatorMessages{
		"videoId.required": "视频ID不能为空",
	}
}

type DeleteVideo struct {
	VideoId int `form:"videoId" json:"videoId" binding:"required"`
	UserId  int `form:"userId" json:"userId" binding:"required"`
}

func (deleteVideo DeleteVideo) GetMessages() ValidatorMessages {
	return ValidatorMessages{
		"videoId.required": "视频ID不能为空",
		"userId.required":  "用户校验失败",
	}
}

type UpdateVideo struct {
	VideoId     int    `form:"videoId" json:"videoId"`
	Title       string `form:"title" json:"title"`
	Description string `form:"description"  json:"description"`
}
